<template>
  <a-card :bordered="false">
    <a-steps class="steps" :current="currentTab">
      <a-step title="设计依据" />
      <a-step title="液体配方组成及性能" />
      <a-step title="施工和药剂" />
      <a-step title="配液用水质及配液设备" />
      <a-step title="液体现场配制程序" />
      <a-step title="现场液体的检测指标及检测" />
      <a-step title="安全环保要求" />
    </a-steps>
    <div class="content">

      <step1 v-if="currentTab === 0" @nextStep="nextStep" :chuancan="chuancan" :panduan="panduan" :shuaxing="shuaxing" :chuanguo="chuanguo"  />
      <step2 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep" :panduan="panduan"  />
      <step3 v-if="currentTab === 2" @prevStep="prevStep"  @nextStep="nextStep"/>
      <step4 v-if="currentTab === 3" @prevStep="prevStep"  @nextStep="nextStep" />
      <step5 v-if="currentTab === 4" @prevStep="prevStep"  @nextStep="nextStep" />
      <step6 v-if="currentTab === 5" @prevStep="prevStep"  @nextStep="nextStep" />
      <step7 v-if="currentTab === 6" @prevStep="prevStep"  @finish="finish"/>
    </div>
  </a-card>
</template>

<script>
  import Step1 from "./Step1";
  import Step2 from './Step2';
  import Step3 from './Step3';
  import Step4 from "./Step4";
  import Step5 from "./Step5";
  import Step6 from "./Step6";
  import Step7 from "./Step7";



  export default {
      props:{
          shuaxing:{}
      },
    name: "StepForm",
    components: {
      Step1,
      Step2,
      Step3,
        Step4,
        Step5,
        Step6,
        Step7

    },
    data () {
      return {
          chuanguo:{},
        description: '将一个冗长或用户不熟悉的表单任务分成多个步骤，指导用户完成。',
        currentTab: 0,

        // form
        form: null,
      }
    },
    methods: {

        chuancan(record){
        console.log(record+"这是传过来的值哈哈哈哈");
        this.chuanguo = record;
        console.log(this.chuanguo+"哈哈哈哈啊哈")

        },
        panduan(record){
            console.log()
        },

      // handler
      nextStep () {
        if (this.currentTab < 11) {
          this.currentTab += 1
        }
      },
      prevStep () {
        if (this.currentTab > 0) {
          this.currentTab -= 1
        }
      },
      finish () {
        this.currentTab = 0
      }
    }
  }
</script>

<style lang="less" scoped>
  .steps {
    max-width: 2000px;
    margin: 16px auto;
  }
</style>